package com.mofang.activity.study;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

import com.mofang.R;
import com.mofang.activity.BaseTitleViewActiviey;
import com.mofang.adapters.MarketAdapter;

public class MarketActivity extends BaseTitleViewActiviey {

	private MarketAdapter adapter;
	private ListView activity_market_list;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_market);
		setNavigationLeftBtnImage(R.drawable.return_arrow);
		setNavigationTitle("市场");

		innitView();

	}

	private void innitView() {
		// TODO Auto-generated method stub
		adapter = new MarketAdapter(getApplicationContext());
		activity_market_list = (ListView) findViewById(R.id.activity_market_list);
		activity_market_list.setAdapter(adapter);
		activity_market_list.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> parent, View view,
					int position, long id) {
				// TODO Auto-generated method stub

				Intent intent = new Intent(getApplicationContext(),
						MarketContentActivity.class);
				startActivity(intent);

			}
		});
	}

}
